import { observer } from "mobx-react";
import { useStore } from "../store";
import { Title, EChart } from "../components";

import "./index.less";

export const App = observer(() => {
  const { chartOptions } = useStore();
  //
  return (
    <div className="h-full w-full">
      <Title text="测试标题" />
      {chartOptions.map((op, index) => {
        return (
          <div
            className="chart"
            style={{
              width: 400,
              height: 300,
            }}
            key={index}
          >
            <EChart chartOptions={op} />
          </div>
        );
      })}
    </div>
  );
});
